clear all
load W_time1_eh1_comp0.out 
load W_time2_eh1_comp0.out
load ParEst_eh1_time0_Mex_nokids1_allboots
load ParEst_eh1_time1_Mex_nokids_allboots 
ParEst_eh1_time1_Mex_nokids_allboots=ParEst_eh0_time1_Mex_nokids_allboots;

boot_t0=ParEst_eh1_time0_Mex_nokids1_allboots(:,end); 
boot_t1=ParEst_eh1_time1_Mex_nokids_allboots(:,end);

theta= 10.^(ParEst_eh1_time0_Mex_nokids1_allboots(:,21));
a=1000*ParEst_eh1_time0_Mex_nokids1_allboots(:,22);
gamma = 500*ParEst_eh1_time1_Mex_nokids_allboots(:,1);

w_mom0=W_time1_eh1_comp0(boot_t0,17); % Read wage moments
p50wi_1=w_mom0; 
HH_avg_Inc = p50wi_1; % median wage of informal men
MWP_a_boot = a./(exp(-theta.*HH_avg_Inc));

for i= boot_t0'
    for j= boot_t1'
    if i==j
        auxtheta(j)= 10.^(ParEst_eh1_time0_Mex_nokids1_allboots(find(ParEst_eh1_time0_Mex_nokids1_allboots(:,25)==i),21));   
    end
    end
end
theta_1= nonzeros(auxtheta);
w_mom1=W_time2_eh1_comp0(boot_t1,17); % Read wage moments
p50wi_1=w_mom1; 
HH_avg_Inc = p50wi_1; % median wage of informal men
MWP_gamma_boot = gamma./(exp(-theta_1.*HH_avg_Inc));

save MWP_a_boot MWP_a_boot
save MWP_gamma_boot MWP_gamma_boot